#include <lcthw/darray_algos.h>
#include <stdlib.h>

int DArray_qsort(DArray *array, DArray_compare cmp)
{
    qsort(array->contents, DArray_count(array), sizeof(void *), cmp);   // qsort is a standard C function that sorts an array, and it returns 0 if successful nothing otherwise
    return 0;
}

int DArray_heapsort(DArray *array, DArray_compare cmp)
{
    return heapsort(array->contents, DArray_count(array), sizeof(void *), cmp); // heapsort is a standard C function that sorts an array, and it returns 0 if successful nothing otherwise
}

int DArray_mergesort(DArray *array, DArray_compare cmp)
{
    return mergesort(array->contents, DArray_count(array), sizeof(void *), cmp); // mergesort is a standard C function that sorts an array, and it returns 0 if successful nothing otherwise
}